/**
 * http://auzll.iteye.com/
 */
package z.action;

import java.util.Map;

import com.google.inject.internal.Maps;

/**
 * @author http://weibo.com/zhengll
 * @since 2011-3-10
 */
public class Result {
    private boolean redirect;

    private Map<String, Object> values;

    private String view;

    public Result(String view) {
        this(view, false);
    }

    public Result(String view, boolean redirect) {
        this.redirect = redirect;
        this.view = view;
        this.values = Maps.newHashMap();
    }

    public Result addValue(String key, Object value) {
        values.put(key, value);
        return this;
    }

    public Map<String, Object> getValues() {
        return values;
    }

    public String getView() {
        return view;
    }

    public boolean isRedirect() {
        return redirect;
    }
}
